package Service.Impl.SignImpl;

import Dao.Sign.DeviceLrDao;
import Model.SignModel.DeviceLr;
import Service.DeviceLrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("DeviceLrService")
public class DeviceLrServiceImpl implements DeviceLrService {

    @Autowired
    private DeviceLrDao deviceLrDao;

    @Override
    public List<DeviceLr> getDeviceLrList(DeviceLr deviceLr){
        System.out.println("[service层：查看老人设备信息~]");
        return deviceLrDao.getDeviceLrList(deviceLr);
    }

    @Override
    public void updateLrDeviceState(DeviceLr deviceLr){
        System.out.println("[service层：更新老人设备状态~]");
        deviceLrDao.updateLrDeviceState(deviceLr);
    }

    @Override
    public void deleteLrDevice(int id){
        System.out.println("[service层：删除老人设备~]");
        deviceLrDao.deleteLrDevice(id);
    }

    @Override
    public void updateLrDevice(DeviceLr deviceLr){
        System.out.println("[service层：编辑老人设备~]");
        deviceLrDao.updateLrDevice(deviceLr);
    }

    @Override
    public void addLrDevice(DeviceLr deviceLr){
        System.out.println("[service层：添加老人设备~]");
        deviceLrDao.addLrDevice(deviceLr);
    }

    @Override
    public List<DeviceLr> getLrDevice(DeviceLr deviceLr){
        System.out.println("[service层：获取老人设备一列~]");
        return deviceLrDao.getLrDevice(deviceLr);
    }
}
